Write description in GDB if we don't have notes.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Nov 2007 02:03:25 +0000 (02:03 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Nov 2007 02:03:25 +0000 (02:03 +0000)
gpsbabel/gdb.c

index 0fd5a4be6968f4187ceb70f5c18f239fd8987581..669b2a68884f5b363f530af9808d285e2da4c9e5 100644 (file)
 
 /*******************************************************************************/
 
-/* static char gdb_release[] = "$Revision: 1.59 $"; */
-static char gdb_release_date[] = "$Date: 2007-08-25 19:35:25 $";
+/* static char gdb_release[] = "$Revision: 1.60 $"; */
+static char gdb_release_date[] = "$Date: 2007-11-15 02:03:25 $";
 
 static gbfile *fin, *fout;
 static int gdb_ver, gdb_category, gdb_via, gdb_roadbook;
@@ -1200,7 +1200,10 @@ write_waypoint(
        FWRITE_LATLON(wpt->latitude);           /* latitude */
        FWRITE_LATLON(wpt->longitude);          /* longitude */
        FWRITE_DBL(wpt->altitude, unknown_alt); /* altitude */
-       FWRITE_CSTR(wpt->notes);
+       if (wpt->notes)
+               FWRITE_CSTR(wpt->notes);
+       else 
+               FWRITE_CSTR(wpt->description);
        FWRITE_DBL(WAYPT_GET(wpt, proximity, unknown_alt), unknown_alt);        /* proximity */
        FWRITE_i32(display);                    /* display */
        FWRITE_i32(0);                          /* color (colour) */